include $(RT28xx_DIR)/os/linux/config.mk

#ifdef CONFIG_AP_SUPPORT
ifeq ($(RT28xx_MODE),AP)
MOD_NAME = rt$(MODULE)ap
DAT_PATH = /etc/Wireless/RT$(MODULE_DAT)AP
DAT_FILE_NAME = RT$(MODULE_DAT)AP.dat
endif
#endif // CONFIG_AP_SUPPORT //

#ifdef CONFIG_STA_SUPPORT
ifeq ($(RT28xx_MODE), STA)
MOD_NAME = rt$(MODULE)sta
DAT_PATH = /etc/Wireless/RT$(MODULE_DAT)STA
DAT_FILE_NAME = RT$(MODULE_DAT)STA.dat
endif
#endif // CONFIG_STA_SUPPORT //

#ifdef CONFIG_APSTA_SUPPORT
ifeq ($(RT28xx_MODE), APSTA)
MOD_NAME = rt$(MODULE)apsta
endif
#endif // CONFIG_APSTA_SUPPORT //

#ifdef WAPI_SUPPORT
ifeq ($(HAS_WAPI_SUPPORT),y)
OBJ := -DEXPORT_SYMTAB
endif
#endif // WAPI_SUPPORT //

OBJ := $(MOD_NAME).o

#ifdef CONFIG_AP_SUPPORT
RT28XX_AP_OBJ := \
	$(RT28xx_DIR)/common/crypt_md5.o\
	$(RT28xx_DIR)/common/crypt_sha2.o\
	$(RT28xx_DIR)/common/crypt_hmac.o\
	$(RT28xx_DIR)/common/crypt_aes.o\
	$(RT28xx_DIR)/common/crypt_arc4.o\
	$(RT28xx_DIR)/common/mlme.o\
	$(RT28xx_DIR)/common/cmm_wep.o\
	$(RT28xx_DIR)/common/action.o\
	$(RT28xx_DIR)/common/cmm_data.o\
	$(RT28xx_DIR)/common/rtmp_init.o\
	$(RT28xx_DIR)/common/rtmp_init_inf.o\
	$(RT28xx_DIR)/common/cmm_tkip.o\
	$(RT28xx_DIR)/common/cmm_aes.o\
	$(RT28xx_DIR)/common/cmm_sync.o\
	$(RT28xx_DIR)/common/eeprom.o\
	$(RT28xx_DIR)/common/cmm_sanity.o\
	$(RT28xx_DIR)/common/cmm_info.o\
	$(RT28xx_DIR)/common/cmm_cfg.o\
	$(RT28xx_DIR)/common/cmm_wpa.o\
	$(RT28xx_DIR)/common/dfs.o\
	$(RT28xx_DIR)/common/spectrum.o\
	$(RT28xx_DIR)/common/rtmp_timer.o\
	$(RT28xx_DIR)/common/rt_channel.o\
	$(RT28xx_DIR)/common/cmm_profile.o\
	$(RT28xx_DIR)/common/cmm_asic.o\
	$(RT28xx_DIR)/common/cmm_cmd.o\
	$(RT28xx_DIR)/rate_ctrl/ra_ctrl.o\
	$(RT28xx_DIR)/rate_ctrl/alg_legacy.o\
	$(RT28xx_DIR)/os/linux/rt_profile.o\
	$(RT28xx_DIR)/ap/ap_mbss.o\
	$(RT28xx_DIR)/chips/rtmp_chip.o\
	$(RT28xx_DIR)/ap/ap.o\
	$(RT28xx_DIR)/ap/ap_assoc.o\
	$(RT28xx_DIR)/ap/ap_auth.o\
	$(RT28xx_DIR)/ap/ap_connect.o\
	$(RT28xx_DIR)/ap/ap_mlme.o\
	$(RT28xx_DIR)/ap/ap_sanity.o\
	$(RT28xx_DIR)/ap/ap_sync.o\
	$(RT28xx_DIR)/ap/ap_wpa.o\
	$(RT28xx_DIR)/ap/ap_data.o\
	$(RT28xx_DIR)/common/uapsd.o\
	$(RT28xx_DIR)/ap/ap_autoChSel.o\
	$(RT28xx_DIR)/ap/ap_qload.o\
	$(RT28xx_DIR)/ap/ap_cfg.o

ifeq ($(OSABL),NO)
RT28XX_AP_OBJ := \
	$(RT28xx_DIR)/ap/ap_mbss_inf.o\
	$(RT28xx_DIR)/common/rt_os_util.o\
	$(RT28xx_DIR)/os/linux/ap_ioctl.o\
	$(RT28xx_DIR)/os/linux/rt_linux.o\
	$(RT28xx_DIR)/os/linux/rt_main_dev.o
else
RT28XX_AP_OBJ := \
	$(RT28xx_DIR)/os/linux/rt_symb.o
endif

ifeq ($(HAS_NEW_RATE_ADAPT_SUPPORT),y)
RT28XX_AP_OBJS += $(RT28xx_DIR)/rate_ctrl/alg_grp.o
endif

#ifdef DOT11_N_SUPPORT
ifeq ($(HAS_DOT11_N_SUPPORT),y)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/ba_action.o

#ifdef TXBF_SUPPORT
ifeq ($(HAS_TXBF_SUPPORT),y)
rt$(MODULE)ap-objs += \
	$(RT28xx_DIR)/common/cmm_txbf.o\
	$(RT28xx_DIR)/common/cmm_txbf_cal.o
endif
#endif // TXBF_SUPPORT //
endif
#endif // DOT11_N_SUPPORT //

#ifdef BG_FT_SUPPORT
ifeq ($(OSABL),NO)
ifeq ($(HAS_BGFP_SUPPORT),y)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/os/linux/br_ftph.o
endif
endif
#endif // BG_FT_SUPPORT //

#ifdef LED_CONTROL_SUPPORT
ifeq ($(HAS_LED_CONTROL_SUPPORT),y)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/rt_led.o
endif
#endif // LED_CONTROL_SUPPORT //

#ifdef RT2860
ifneq ($(findstring 2860,$(CHIPSET)),)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_pci.o\
	$(RT28xx_DIR)/common/cmm_data_pci.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_drv.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o\
	$(RT28xx_DIR)/common/ee_prom.o\
	$(RT28xx_DIR)/chips/rt28xx.o

ifeq ($(HAS_ATE),y)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt28xx_ate.o\
	$(RT28xx_DIR)/ate/common/ate_pci.o
endif

ifeq ($(OSABL),NO)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/os/linux/rt_pci_rbus.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_util.o\
	$(RT28xx_DIR)/os/linux/pci_main_dev.o
endif
endif
#endif // RT2860 //

#ifdef RT3090
ifneq ($(findstring 3090,$(CHIPSET)),)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_pci.o\
	$(RT28xx_DIR)/common/cmm_data_pci.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_drv.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o\
	$(RT28xx_DIR)/common/ee_prom.o\
	$(RT28xx_DIR)/common/ee_efuse.o\
	$(RT28xx_DIR)/common/rt_rf.o\
	$(RT28xx_DIR)/chips/rt30xx.o\
	$(RT28xx_DIR)/chips/rt3090.o

ifeq ($(HAS_ATE),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt30xx_ate.o\
	$(RT28xx_DIR)/ate/common/ate_pci.o
endif

ifeq ($(OSABL),NO)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/os/linux/rt_pci_rbus.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_util.o\
	$(RT28xx_DIR)/os/linux/pci_main_dev.o
endif
ifeq ($(HAS_RTMP_FLASH_SUPPORT),y)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/ee_flash.o
endif
endif
#endif // RT3090 //

#ifdef RT2870
ifneq ($(findstring 2870,$(CHIPSET)),)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_usb.o\
	$(RT28xx_DIR)/common/rtusb_io.o\
	$(RT28xx_DIR)/common/rtusb_data.o\
	$(RT28xx_DIR)/common/cmm_data_usb.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o\
	$(RT28xx_DIR)/common/rtusb_bulk.o\
	$(RT28xx_DIR)/os/linux/rt_usb.o\
	$(RT28xx_DIR)/common/ee_prom.o\
	$(RT28xx_DIR)/chips/rt28xx.o

ifeq ($(HAS_ATE),y)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt28xx_ate.o\
	$(RT28xx_DIR)/ate/common/ate_usb.o
endif

ifeq ($(OSABL),NO)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/rtusb_dev_id.o\
	$(RT28xx_DIR)/os/linux/rt_usb_util.o\
	$(RT28xx_DIR)/os/linux/usb_main_dev.o
endif
endif
#endif // RT2870 //

#ifdef RT3070
ifneq ($(findstring 2070,$(CHIPSET)),)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_usb.o\
	$(RT28xx_DIR)/common/rtusb_io.o\
	$(RT28xx_DIR)/common/rtusb_data.o\
	$(RT28xx_DIR)/common/cmm_data_usb.o\
	$(RT28xx_DIR)/common/rtusb_bulk.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o\
	$(RT28xx_DIR)/common/ee_prom.o\
	$(RT28xx_DIR)/common/ee_efuse.o\
	$(RT28xx_DIR)/chips/rt30xx.o\
	$(RT28xx_DIR)/common/rt_rf.o\
	$(RT28xx_DIR)/os/linux/rt_usb.o\
	$(RT28xx_DIR)/chips/rt3070.o

ifeq ($(HAS_ATE),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt30xx_ate.o\
	$(RT28xx_DIR)/ate/common/ate_usb.o
endif

ifeq ($(OSABL),NO)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/rtusb_dev_id.o\
	$(RT28xx_DIR)/os/linux/rt_usb_util.o\
	$(RT28xx_DIR)/os/linux/usb_main_dev.o
endif
endif

ifneq ($(findstring 3070,$(CHIPSET)),)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_usb.o\
	$(RT28xx_DIR)/common/rtusb_io.o\
	$(RT28xx_DIR)/common/rtusb_data.o\
	$(RT28xx_DIR)/common/cmm_data_usb.o\
	$(RT28xx_DIR)/common/rtusb_bulk.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o\
	$(RT28xx_DIR)/common/ee_prom.o\
	$(RT28xx_DIR)/common/ee_efuse.o\
	$(RT28xx_DIR)/common/rt_rf.o\
	$(RT28xx_DIR)/os/linux/rt_usb.o\
	$(RT28xx_DIR)/chips/rt30xx.o\
	$(RT28xx_DIR)/chips/rt3070.o

ifeq ($(HAS_ATE),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt30xx_ate.o\
	$(RT28xx_DIR)/ate/common/ate_usb.o
endif

ifeq ($(OSABL),NO)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/rtusb_dev_id.o\
	$(RT28xx_DIR)/os/linux/rt_usb_util.o\
	$(RT28xx_DIR)/os/linux/usb_main_dev.o
endif
endif
#endif // RT3070 //

#ifdef RT2880
ifneq ($(findstring 2880,$(CHIPSET)),)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_pci.o\
	$(RT28xx_DIR)/common/cmm_data_pci.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_drv.o\
	$(RT28xx_DIR)/common/ee_flash.o\
	$(RT28xx_DIR)/common/rtmp_swmcu.o\
	$(RT28xx_DIR)/chips/rt2880.o

ifeq ($(HAS_DFS_SUPPORT),y)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/dfs_mcu.o
endif

ifeq ($(HAS_ATE),y)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt28xx_ate.o\
	$(RT28xx_DIR)/ate/common/ate_pci.o
endif

ifeq ($(OSABL),NO)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/os/linux/rt_pci_rbus.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_util.o\
	$(RT28xx_DIR)/os/linux/pci_main_dev.o
endif
endif
#endif // RT2880 //

#ifdef RT35xx
ifneq ($(findstring 3572,$(CHIPSET)),)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_usb.o\
	$(RT28xx_DIR)/common/rtusb_io.o\
	$(RT28xx_DIR)/common/rtusb_data.o\
	$(RT28xx_DIR)/common/cmm_data_usb.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o\
	$(RT28xx_DIR)/common/ee_prom.o\
	$(RT28xx_DIR)/common/ee_efuse.o\
	$(RT28xx_DIR)/common/rt_rf.o\
	$(RT28xx_DIR)/common/rtusb_bulk.o\
	$(RT28xx_DIR)/os/linux/rt_usb.o\
	$(RT28xx_DIR)/chips/rt28xx.o\
	$(RT28xx_DIR)/chips/rt30xx.o\
	$(RT28xx_DIR)/chips/rt35xx.o

ifeq ($(HAS_ATE),y)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt28xx_ate.o\
	$(RT28xx_DIR)/ate/chips/rt35xx_ate.o\
	$(RT28xx_DIR)/ate/common/ate_usb.o
endif

ifeq ($(OSABL),NO)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/rtusb_dev_id.o\
	$(RT28xx_DIR)/os/linux/rt_usb_util.o\
	$(RT28xx_DIR)/os/linux/usb_main_dev.o
endif
endif

ifneq ($(findstring 3062,$(CHIPSET)),)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_pci.o\
	$(RT28xx_DIR)/common/cmm_data_pci.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_drv.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o\
	$(RT28xx_DIR)/common/ee_prom.o\
	$(RT28xx_DIR)/common/ee_efuse.o\
	$(RT28xx_DIR)/common/rt_rf.o\
	$(RT28xx_DIR)/chips/rt30xx.o\
	$(RT28xx_DIR)/chips/rt35xx.o

ifeq ($(HAS_ATE),y)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt35xx_ate.o\
	$(RT28xx_DIR)/ate/common/ate_pci.o
endif

ifeq ($(OSABL),NO)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/os/linux/rt_pci_rbus.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_util.o\
	$(RT28xx_DIR)/os/linux/pci_main_dev.o
endif
endif

ifneq ($(findstring 3562,$(CHIPSET)),)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_pci.o\
	$(RT28xx_DIR)/common/cmm_data_pci.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_drv.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o\
	$(RT28xx_DIR)/common/ee_prom.o\
	$(RT28xx_DIR)/common/ee_efuse.o\
	$(RT28xx_DIR)/common/rt_rf.o\
	$(RT28xx_DIR)/chips/rt28xx.o\
	$(RT28xx_DIR)/chips/rt30xx.o\
	$(RT28xx_DIR)/chips/rt35xx.o
ifeq ($(HAS_DFS_SUPPORT),y)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/dfs_mcu.o
endif

ifeq ($(HAS_ATE),y)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt28xx_ate.o\
	$(RT28xx_DIR)/ate/chips/rt35xx_ate.o\
	$(RT28xx_DIR)/ate/common/ate_pci.o
endif

ifeq ($(OSABL),NO)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/os/linux/rt_pci_rbus.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_util.o\
	$(RT28xx_DIR)/os/linux/pci_main_dev.o
endif
endif

ifneq ($(findstring 3573,$(CHIPSET)),)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_usb.o\
	$(RT28xx_DIR)/common/rtusb_io.o\
	$(RT28xx_DIR)/common/rtusb_data.o\
	$(RT28xx_DIR)/common/cmm_data_usb.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o\
	$(RT28xx_DIR)/common/ee_prom.o\
	$(RT28xx_DIR)/common/ee_efuse.o\
	$(RT28xx_DIR)/common/rt_rf.o\
	$(RT28xx_DIR)/common/rtusb_bulk.o\
	$(RT28xx_DIR)/common/frq_cal.o\
	$(RT28xx_DIR)/os/linux/rt_usb.o\
	$(RT28xx_DIR)/chips/rt28xx.o\
	$(RT28xx_DIR)/chips/rt30xx.o\
	$(RT28xx_DIR)/chips/rt35xx.o\
	$(RT28xx_DIR)/chips/rt3593.o

ifeq ($(HAS_ATE),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt3593_ate.o\
	$(RT28xx_DIR)/ate/common/ate_usb.o
endif

ifeq ($(OSABL),NO)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/rtusb_dev_id.o\
	$(RT28xx_DIR)/os/linux/rt_usb_util.o\
	$(RT28xx_DIR)/os/linux/usb_main_dev.o
endif
ifeq ($(HAS_DFS_SUPPORT),y)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/dfs_mcu.o
endif
endif

ifneq ($(findstring 3593,$(CHIPSET)),)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_pci.o\
	$(RT28xx_DIR)/common/cmm_data_pci.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_drv.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o\
	$(RT28xx_DIR)/common/ee_prom.o\
	$(RT28xx_DIR)/common/ee_efuse.o\
	$(RT28xx_DIR)/common/rt_rf.o\
	$(RT28xx_DIR)/common/frq_cal.o\
	$(RT28xx_DIR)/chips/rt30xx.o\
	$(RT28xx_DIR)/chips/rt35xx.o\
	$(RT28xx_DIR)/chips/rt28xx.o\
	$(RT28xx_DIR)/chips/rt3593.o

ifeq ($(HAS_ATE),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt3593_ate.o\
	$(RT28xx_DIR)/ate/common/ate_pci.o
endif

ifeq ($(OSABL),NO)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/os/linux/rt_pci_rbus.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_util.o\
	$(RT28xx_DIR)/os/linux/pci_main_dev.o
endif
ifeq ($(HAS_DFS_SUPPORT),y)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/dfs_mcu.o
endif
endif

#endif // RT35xx //

#ifdef RT3390
ifneq ($(findstring 3390,$(CHIPSET)),)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_pci.o\
	$(RT28xx_DIR)/common/cmm_data_pci.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_drv.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o\
	$(RT28xx_DIR)/common/ee_prom.o\
	$(RT28xx_DIR)/common/ee_efuse.o\
	$(RT28xx_DIR)/common/rt_rf.o\
	$(RT28xx_DIR)/chips/rt30xx.o\
	$(RT28xx_DIR)/chips/rt3090.o\
	$(RT28xx_DIR)/chips/rt33xx.o\
	$(RT28xx_DIR)/chips/rt3390.o

ifeq ($(HAS_ATE),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt33xx_ate.o\
	$(RT28xx_DIR)/ate/chips/rt30xx_ate.o\
	$(RT28xx_DIR)/ate/common/ate_pci.o
endif

ifeq ($(OSABL),NO)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/os/linux/rt_pci_rbus.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_util.o\
	$(RT28xx_DIR)/os/linux/pci_main_dev.o
endif
endif
#endif // RT3390 //

#ifdef RT3370
ifneq ($(findstring 3370,$(CHIPSET)),)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_usb.o\
	$(RT28xx_DIR)/common/rtusb_io.o\
	$(RT28xx_DIR)/common/rtusb_data.o\
	$(RT28xx_DIR)/common/cmm_data_usb.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o\
	$(RT28xx_DIR)/common/ee_prom.o\
	$(RT28xx_DIR)/common/ee_efuse.o\
	$(RT28xx_DIR)/common/rt_rf.o\
	$(RT28xx_DIR)/common/rtusb_bulk.o\
	$(RT28xx_DIR)/os/linux/rt_usb.o\
	$(RT28xx_DIR)/chips/rt33xx.o\
	$(RT28xx_DIR)/chips/rt3370.o\
	$(RT28xx_DIR)/chips/rt3070.o\
	$(RT28xx_DIR)/chips/rt30xx.o

ifeq ($(HAS_ATE),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt33xx_ate.o\
	$(RT28xx_DIR)/ate/chips/rt30xx_ate.o\
	$(RT28xx_DIR)/ate/common/ate_usb.o
endif

ifeq ($(OSABL),NO)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/rtusb_dev_id.o\
	$(RT28xx_DIR)/os/linux/rt_usb_util.o\
	$(RT28xx_DIR)/os/linux/usb_main_dev.o
endif
endif
#endif // RT3370 //

#ifdef RT5390
ifneq ($(findstring 5390,$(CHIPSET)),)
RT28XX_AP_OBJ += \
        $(RT28xx_DIR)/common/cmm_mac_pci.o\
        $(RT28xx_DIR)/common/cmm_data_pci.o\
        $(RT28xx_DIR)/os/linux/rt_rbus_pci_drv.o\
        $(RT28xx_DIR)/common/rtmp_mcu.o\
        $(RT28xx_DIR)/common/ee_prom.o\
        $(RT28xx_DIR)/common/ee_efuse.o\
        $(RT28xx_DIR)/common/rt_rf.o\
        $(RT28xx_DIR)/chips/rt30xx.o\
        $(RT28xx_DIR)/chips/rt3090.o\
        $(RT28xx_DIR)/chips/rt33xx.o\
        $(RT28xx_DIR)/chips/rt3390.o\
        $(RT28xx_DIR)/chips/rt5390.o

ifeq ($(HAS_ATE),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt5390_ate.o\
	$(RT28xx_DIR)/ate/chips/rt33xx_ate.o\
	$(RT28xx_DIR)/ate/chips/rt30xx_ate.o\
	$(RT28xx_DIR)/ate/common/ate_usb.o
endif

ifeq ($(OSABL),NO)
RT28XX_AP_OBJ += \
        $(RT28xx_DIR)/os/linux/rt_pci_rbus.o\
        $(RT28xx_DIR)/os/linux/rt_rbus_pci_util.o\
        $(RT28xx_DIR)/os/linux/pci_main_dev.o
endif
endif
#endif // RT5390 //

#ifdef RT5370
ifneq ($(findstring 5370,$(CHIPSET)),)
RT28XX_AP_OBJ += \
        $(RT28xx_DIR)/common/cmm_mac_usb.o\
        $(RT28xx_DIR)/common/rtusb_io.o\
        $(RT28xx_DIR)/common/rtusb_bulk.o\
        $(RT28xx_DIR)/common/rtusb_data.o\
        $(RT28xx_DIR)/common/cmm_data_usb.o\
        $(RT28xx_DIR)/common/rtmp_mcu.o\
        $(RT28xx_DIR)/common/ee_prom.o\
        $(RT28xx_DIR)/common/ee_efuse.o\
        $(RT28xx_DIR)/common/rt_rf.o\
        $(RT28xx_DIR)/chips/rt30xx.o\
        $(RT28xx_DIR)/chips/rt3070.o\
        $(RT28xx_DIR)/chips/rt33xx.o\
        $(RT28xx_DIR)/chips/rt3370.o\
	$(RT28xx_DIR)/chips/rt5390.o

ifeq ($(HAS_ATE),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt5390_ate.o\
	$(RT28xx_DIR)/ate/chips/rt33xx_ate.o\
	$(RT28xx_DIR)/ate/chips/rt30xx_ate.o\
	$(RT28xx_DIR)/ate/common/ate_usb.o
endif

ifeq ($(OSABL),NO)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/os/linux/rt_pci_rbus.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_util.o\
	$(RT28xx_DIR)/os/linux/pci_main_dev.o
endif
endif
#endif // RT5370 //

#ifdef RT5572
ifneq ($(findstring 5572,$(CHIPSET)),)
RT28XX_AP_OBJ += \
		$(RT28xx_DIR)/common/cmm_mac_usb.o\
		$(RT28xx_DIR)/common/rtusb_io.o\
		$(RT28xx_DIR)/common/rtusb_data.o\
		$(RT28xx_DIR)/common/cmm_data_usb.o\
		$(RT28xx_DIR)/common/rtusb_bulk.o\
		$(RT28xx_DIR)/common/ee_prom.o\
		$(RT28xx_DIR)/common/ee_efuse.o\
		$(RT28xx_DIR)/common/rtmp_mcu.o\
		$(RT28xx_DIR)/common/frq_cal.o\
		$(RT28xx_DIR)/common/rt_rf.o\
		$(RT28xx_DIR)/os/linux/rt_usb.o\
		$(RT28xx_DIR)/chips/rt30xx.o\
		$(RT28xx_DIR)/chips/rt5592.o

ifeq ($(HAS_RTMP_FLASH_SUPPORT),y)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/ee_flash.o
endif

ifeq ($(HAS_ATE),y)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt5592_ate.o\
	$(RT28xx_DIR)/ate/common/ate_usb.o
endif

ifeq ($(OSABL),NO)
RT28XX_AP_OBJ += \
        $(RT28xx_DIR)/common/rtusb_dev_id.o\
        $(RT28xx_DIR)/os/linux/rt_usb_util.o\
        $(RT28xx_DIR)/os/linux/usb_main_dev.o
endif
ifeq ($(HAS_DFS_SUPPORT),y)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/dfs_mcu.o
endif
endif
#endif // RT5572 //

#ifdef RTMP_MAC_PCI
#ifdef RT5592
ifneq ($(findstring 5592,$(CHIPSET)),)
RT28XX_AP_OBJ += \
		$(RT28xx_DIR)/common/cmm_mac_pci.o\
		$(RT28xx_DIR)/common/cmm_data_pci.o\
		$(RT28xx_DIR)/common/rt_rbus_pci_drv.o\
		$(RT28xx_DIR)/common/ee_prom.o\
		$(RT28xx_DIR)/common/frq_cal.o\
		$(RT28xx_DIR)/common/ee_efuse.o\
		$(RT28xx_DIR)/common/rtmp_mcu.o\
		$(RT28xx_DIR)/common/rt_rf.o\
		$(RT28xx_DIR)/chips/rt30xx.o\
		$(RT28xx_DIR)/chips/rt5592.o

ifeq ($(HAS_RTMP_FLASH_SUPPORT),y)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/ee_flash.o
endif

ifeq ($(HAS_ATE),y)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt5592_ate.o\
	$(RT28xx_DIR)/ate/common/ate_pci.o
endif

ifeq ($(OSABL),NO)
RT28XX_AP_OBJ += \
        $(RT28xx_DIR)/os/rt_pci_rbus.o\
        $(RT28xx_DIR)/os/linux/rt_rbus_pci_util.o\
        $(RT28xx_DIR)/os/linux/pci_main_dev.o
endif
ifeq ($(HAS_DFS_SUPPORT),y)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/dfs_mcu.o
endif
endif
#endif // RT5592 //
#endif // RTMP_MAC_PCI //


ifeq ($(HAS_RT2880_RT2860_COEXIST),y)	
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/os/linux/rt_pci_rbus.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_util.o\
	$(RT28xx_DIR)/os/linux/pci_main_dev.o\
	$(RT28xx_DIR)/common/dfs.o
endif

ifeq ($(HAS_ATE),y)
RT28XX_AP_OBJ += $(RT28xx_DIR)/ate/common/rt_ate.o
endif

ifeq ($(HAS_QA_SUPPORT),y)
RT28XX_AP_OBJ += $(RT28xx_DIR)/ate/common/rt_qa.o
endif

#ifdef WSC_INCLUDED
ifeq ($(HAS_WSC),y)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/wsc.o\
	$(RT28xx_DIR)/common/wsc_tlv.o\
	$(RT28xx_DIR)/common/wsc_ufd.o\
	$(RT28xx_DIR)/common/crypt_biginteger.o\
	$(RT28xx_DIR)/common/crypt_dh.o
endif
ifeq ($(HAS_WSC_V2),y)
RT28XX_AP_OBJ += $(RT28xx_DIR)/common/wsc_v2.o
endif
ifeq ($(HAS_WSC_NFC),y)
RT28XX_AP_OBJ += $(RT28xx_DIR)/common/nfc.o
endif
#endif // WSC_INCLUDED //

#ifdef EASY_CONFIG_SETUP
ifeq ($(HAS_EASY_CONFIG_SETUP_SUPPORT),y)
ifneq ($(PLATFORM),RALINK_3052)
RT28XX_AP_OBJ += $(RT28xx_DIR)/common/auto_provision.o
endif
endif
#endif // EASY_CONFIG_SETUP //

#ifdef NINTENDO_AP
ifeq ($(HAS_NINTENDO),y)
RT28XX_AP_OBJ += $(RT28xx_DIR)/ap/ap_nintendo.o
endif
#endif // NINTENDO_AP //

ifeq ($(HAS_WDS),y)
RT28XX_AP_OBJ += $(RT28xx_DIR)/ap/ap_wds.o

ifeq ($(OSABL),NO)
RT28XX_AP_OBJ += \
	../../ap/ap_wds_inf.o
endif
endif

#ifdef APCLI_SUPPORT
ifeq ($(HAS_APCLI),y)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/ap/ap_apcli.o \
	$(RT28xx_DIR)/ap/apcli_ctrl.o \
	$(RT28xx_DIR)/ap/apcli_sync.o \
	$(RT28xx_DIR)/ap/apcli_auth.o \
	$(RT28xx_DIR)/ap/apcli_assoc.o \
	$(RT28xx_DIR)/common/cmm_mat.o \
	$(RT28xx_DIR)/common/cmm_mat_iparp.o \
	$(RT28xx_DIR)/common/cmm_mat_pppoe.o \
	$(RT28xx_DIR)/common/cmm_mat_ipv6.o

ifeq ($(OSABL),NO)
RT28XX_AP_OBJ += \
	../../ap/ap_apcli_inf.o
endif
endif
#endif // APCLI_SUPPORT //

ifeq ($(HAS_BLOCK_NET_IF),y)
RT28XX_AP_OBJ += $(RT28xx_DIR)/common/netif_block.o
endif

ifeq ($(HAS_IGMP_SNOOP_SUPPORT),y)
RT28XX_AP_OBJ += $(RT28xx_DIR)/common/igmp_snoop.o
endif

#ifdef WMM_ACM_SUPPORT
ifeq ($(HAS_WMM_ACM_SUPPORT),y)
RT28XX_AP_OBJ += $(RT28xx_DIR)/common/acm_edca.o\
	$(RT28xx_DIR)/common/acm_comm.o\
	$(RT28xx_DIR)/common/acm_iocl.o
endif
#endif // WMM_ACM_SUPPORT //

ifeq ($(HAS_QOS_DLS_SUPPORT),y)
RT28XX_AP_OBJ += $(RT28xx_DIR)/ap/ap_dls.o
endif

ifeq ($(HAS_IDS_SUPPORT),y)
RT28XX_AP_OBJ += $(RT28xx_DIR)/ap/ap_ids.o
endif

ifeq ($(PLATFORM),IKANOS_V160)
RT28XX_AP_OBJ += $(RT28xx_DIR)/os/linux/vr_ikans.o
endif

ifeq ($(PLATFORM),IKANOS_V180)
RT28XX_AP_OBJ += $(RT28xx_DIR)/os/linux/vr_ikans.o
endif

#ifdef MESH_SUPPORT
ifeq ($(HAS_MESH_SUPPORT),y)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/mesh_bmpkt.o \
	$(RT28xx_DIR)/common/mesh_ctrl.o \
	$(RT28xx_DIR)/common/mesh_link_mng.o \
	$(RT28xx_DIR)/common/mesh_sanity.o \
	$(RT28xx_DIR)/common/mesh_tlv.o \
	$(RT28xx_DIR)/common/mesh.o \
	$(RT28xx_DIR)/common/mesh_forwarding.o \
	$(RT28xx_DIR)/common/mesh_path_mng.o

ifeq ($(OSABL),NO)
RT28XX_AP_OBJ += \
	../../common/mesh_inf.o
endif
endif
#endif // MESH_SUPPORT //

#ifdef WAPI_SUPPORT
ifeq ($(HAS_WAPI_SUPPORT),y)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/wapi.o
endif
#endif // WAPI_SUPPORT //

#ifdef DOT11R_FT_SUPPORT
ifeq ($(HAS_DOT11R_FT_SUPPORT),y)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/ft.o\
	$(RT28xx_DIR)/common/ft_tlv.o\
	$(RT28xx_DIR)/common/ft_iocl.o\
	$(RT28xx_DIR)/common/ft_rc.o\
	$(RT28xx_DIR)/ap/ap_ftkd.o
endif
#endif // DOT11R_FT_SUPPORT //

#ifdef DOT11K_RRM_SUPPORT
ifeq ($(HAS_DOT11K_RRM_SUPPORT),y)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/rrm_tlv.o \
	$(RT28xx_DIR)/common/rrm_sanity.o \
	$(RT28xx_DIR)/common/rrm.o
endif
#endif // DOT11K_RRM_SUPPORT //

#ifdef DOT11W_PMF_SUPPORT
ifeq ($(HAS_DOT11W_PMF_SUPPORT),y)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/pmf.o
endif
#endif // DOT11W_PMF_SUPPORT //

ifeq ($(HAS_CLIENT_WDS_SUPPORT),y)
RT28XX_AP_OBJ += \
	$(RT28xx_DIR)/common/client_wds.o
endif
#endif // CONFIG_AP_SUPPORT //

#ifdef CONFIG_STA_SUPPORT
RT28XX_STA_OBJ := \
	$(RT28xx_DIR)/common/crypt_md5.o\
	$(RT28xx_DIR)/common/crypt_sha2.o\
	$(RT28xx_DIR)/common/crypt_hmac.o\
	$(RT28xx_DIR)/common/crypt_aes.o\
	$(RT28xx_DIR)/common/crypt_arc4.o\
	$(RT28xx_DIR)/common/mlme.o\
	$(RT28xx_DIR)/common/cmm_wep.o\
	$(RT28xx_DIR)/common/action.o\
	$(RT28xx_DIR)/common/cmm_data.o\
	$(RT28xx_DIR)/common/rtmp_init.o\
	$(RT28xx_DIR)/common/rtmp_init_inf.o\
	$(RT28xx_DIR)/common/cmm_tkip.o\
	$(RT28xx_DIR)/common/cmm_aes.o\
	$(RT28xx_DIR)/common/cmm_sync.o\
	$(RT28xx_DIR)/common/eeprom.o\
	$(RT28xx_DIR)/common/cmm_sanity.o\
	$(RT28xx_DIR)/common/cmm_info.o\
	$(RT28xx_DIR)/common/cmm_cfg.o\
	$(RT28xx_DIR)/common/cmm_wpa.o\
	$(RT28xx_DIR)/common/dfs.o\
	$(RT28xx_DIR)/common/spectrum.o\
	$(RT28xx_DIR)/common/rtmp_timer.o\
	$(RT28xx_DIR)/common/rt_channel.o\
	$(RT28xx_DIR)/common/cmm_profile.o\
	$(RT28xx_DIR)/common/cmm_asic.o\
	$(RT28xx_DIR)/common/cmm_cmd.o\
	$(RT28xx_DIR)/rate_ctrl/ra_ctrl.o\
	$(RT28xx_DIR)/rate_ctrl/alg_legacy.o\
	$(RT28xx_DIR)/rate_ctrl/alg_ags.o\
	$(RT28xx_DIR)/os/linux/rt_profile.o\
	$(RT28xx_DIR)/chips/rtmp_chip.o\
	$(RT28xx_DIR)/sta/assoc.o\
	$(RT28xx_DIR)/sta/auth.o\
	$(RT28xx_DIR)/sta/auth_rsp.o\
	$(RT28xx_DIR)/sta/sync.o\
	$(RT28xx_DIR)/sta/sanity.o\
	$(RT28xx_DIR)/sta/rtmp_data.o\
	$(RT28xx_DIR)/sta/connect.o\
	$(RT28xx_DIR)/sta/wpa.o\
	$(RT28xx_DIR)/sta/sta_cfg.o

ifeq ($(OSABL),NO)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/common/rt_os_util.o\
	$(RT28xx_DIR)/os/linux/sta_ioctl.o\
	$(RT28xx_DIR)/os/linux/rt_linux.o\
	$(RT28xx_DIR)/os/linux/rt_main_dev.o
else
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/os/linux/rt_symb.o
endif

ifeq ($(HAS_NEW_RATE_ADAPT_SUPPORT),y)
RT28XX_STA_OBJS += $(RT28xx_DIR)/rate_ctrl/alg_grp.o
endif

ifeq ($(HAS_ATE),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/ate/common/rt_ate.o
endif

ifeq ($(HAS_QA_SUPPORT),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/ate/common/rt_qa.o
endif

#ifdef DOT11_N_SUPPORT
ifeq ($(HAS_DOT11_N_SUPPORT),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/common/ba_action.o

#ifdef TXBF_SUPPORT
ifeq ($(HAS_TXBF_SUPPORT),y)
rt$(MODULE)sta-objs += \
	$(RT28xx_DIR)/common/cmm_txbf.o\
	$(RT28xx_DIR)/common/cmm_txbf_cal.o
endif
#endif // TXBF_SUPPORT //
endif
#endif // DOT11_N_SUPPORT //

#ifdef ETH_CONVERT
ifeq ($(HAS_ETH_CONVERT_SUPPORT), y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/common/cmm_mat.o \
	$(RT28xx_DIR)/common/cmm_mat_iparp.o \
	$(RT28xx_DIR)/common/cmm_mat_pppoe.o \
	$(RT28xx_DIR)/common/cmm_mat_ipv6.o
endif
#endif // ETH_CONVERT //

#ifdef ADHOC_WPA2PSK_SUPPORT
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/common/cmm_wpa_adhoc.o
#endif // ADHOC_WPA2PSK_SUPPORT //

#ifdef WSC_INCLUDED
ifeq ($(HAS_WSC),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/common/wsc.o\
	$(RT28xx_DIR)/common/wsc_tlv.o\
	$(RT28xx_DIR)/common/crypt_biginteger.o\
	$(RT28xx_DIR)/common/crypt_dh.o
endif
ifeq ($(HAS_WSC_V2),y)
RT28XX_STA_OBJ += $(RT28xx_DIR)/common/wsc_v2.o
endif
#endif // WSC_INCLUDED //

#ifdef STA_EASY_CONFIG_SETUP
ifeq ($(HAS_WSC),y)
ifeq ($(HAS_EASY_CONFIG_SETUP_SUPPORT),y)
rt$(MODULE)sta-objs += \
	$(RT28xx_DIR)/common/auto_provision.o \
	$(RT28xx_DIR)/sta/sta_auto_provision.o
endif
endif
#endif // STA_EASY_CONFIG_SETUP //

ifeq ($(HAS_BLOCK_NET_IF),y)
RT28XX_STA_OBJ += $(RT28xx_DIR)/common/netif_block.o
endif

ifeq ($(HAS_QOS_DLS_SUPPORT),y)
RT28XX_STA_OBJ += $(RT28xx_DIR)/sta/dls.o
endif

#ifdef DOT11Z_TDLS_SUPPORT
ifeq ($(HAS_DOT11Z_TDLS_SUPPORT),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/sta/tdls.o\
	$(RT28xx_DIR)/sta/tdls_ctrl.o\
	$(RT28xx_DIR)/sta/tdls_tlv.o\
	$(RT28xx_DIR)/sta/tdls_link_mng.o
endif
#endif // DOT11Z_TDLS_SUPPORT //

#ifdef WFD_SUPPORT
ifeq ($(HAS_WFD_SUPPORT),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/common/wfd.o
endif
#endif // WFD_SUPPORT //

#ifdef LED_CONTROL_SUPPORT
ifeq ($(HAS_LED_CONTROL_SUPPORT),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/common/rt_led.o
endif
#endif // LED_CONTROL_SUPPORT //

#ifdef RT2860
ifneq ($(findstring 2860,$(CHIPSET)),)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_pci.o\
	$(RT28xx_DIR)/common/cmm_data_pci.o\
	$(RT28xx_DIR)/common/ee_prom.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o

ifeq ($(HAS_ATE),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt28xx_ate.o\
	$(RT28xx_DIR)/ate/common/ate_pci.o
endif

ifeq ($(OSABL),NO)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/os/linux/rt_pci_rbus.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_util.o\
	$(RT28xx_DIR)/os/linux/pci_main_dev.o
endif
endif
#endif // RT2860 //

#ifdef RT3090
ifneq ($(findstring 3090,$(CHIPSET)),)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_pci.o\
	$(RT28xx_DIR)/common/cmm_data_pci.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_drv.o\
	$(RT28xx_DIR)/common/ee_prom.o\
	$(RT28xx_DIR)/common/ee_efuse.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o\
	$(RT28xx_DIR)/chips/rt30xx.o\
	$(RT28xx_DIR)/common/rt_rf.o\
	$(RT28xx_DIR)/chips/rt3090.o

ifeq ($(HAS_ATE),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt30xx_ate.o\
	$(RT28xx_DIR)/ate/common/ate_pci.o
endif

ifeq ($(OSABL),NO)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/os/linux/rt_pci_rbus.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_util.o\
	$(RT28xx_DIR)/os/linux/pci_main_dev.o
endif
endif
#endif // RT3090 //

#ifdef RT2870
ifneq ($(findstring 2870,$(CHIPSET)),)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_usb.o\
	$(RT28xx_DIR)/common/rtusb_io.o\
	$(RT28xx_DIR)/common/rtusb_data.o\
	$(RT28xx_DIR)/common/cmm_data_usb.o\
	$(RT28xx_DIR)/common/ee_prom.o\
	$(RT28xx_DIR)/common/rtusb_bulk.o\
	$(RT28xx_DIR)/os/linux/rt_usb.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o\
	$(RT28xx_DIR)/chips/rt28xx.o

ifeq ($(HAS_ATE),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt28xx_ate.o\
	$(RT28xx_DIR)/ate/common/ate_usb.o
endif

ifeq ($(OSABL),NO)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/common/rtusb_dev_id.o\
	$(RT28xx_DIR)/os/linux/rt_usb_util.o\
	$(RT28xx_DIR)/os/linux/usb_main_dev.o
endif
endif
#endif // RT2870 //

#ifdef RT3070
ifneq ($(findstring 2070,$(CHIPSET)),)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_usb.o\
	$(RT28xx_DIR)/common/rtusb_io.o\
	$(RT28xx_DIR)/common/rtusb_data.o\
	$(RT28xx_DIR)/common/cmm_data_usb.o\
	$(RT28xx_DIR)/common/ee_prom.o\
	$(RT28xx_DIR)/common/ee_efuse.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o\
	$(RT28xx_DIR)/chips/rt30xx.o\
	$(RT28xx_DIR)/common/rt_rf.o\
	$(RT28xx_DIR)/common/rtusb_bulk.o\
	$(RT28xx_DIR)/os/linux/rt_usb.o\
	$(RT28xx_DIR)/chips/rt3070.o

ifeq ($(HAS_ATE),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/ate/common/ate_usb.o
endif

ifeq ($(OSABL),NO)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/common/rtusb_dev_id.o\
	$(RT28xx_DIR)/os/linux/rt_usb_util.o\
	$(RT28xx_DIR)/os/linux/usb_main_dev.o
endif
endif

ifneq ($(findstring 3070,$(CHIPSET)),)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_usb.o\
	$(RT28xx_DIR)/common/rtusb_io.o\
	$(RT28xx_DIR)/common/rtusb_data.o\
	$(RT28xx_DIR)/common/cmm_data_usb.o\
	$(RT28xx_DIR)/common/ee_prom.o\
	$(RT28xx_DIR)/common/ee_efuse.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o\
	$(RT28xx_DIR)/chips/rt30xx.o\
	$(RT28xx_DIR)/common/rt_rf.o\
	$(RT28xx_DIR)/common/rtusb_bulk.o\
	$(RT28xx_DIR)/os/linux/rt_usb.o\
	$(RT28xx_DIR)/chips/rt3070.o

ifeq ($(HAS_ATE),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/ate/common/ate_usb.o
endif

ifeq ($(OSABL),NO)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/common/rtusb_dev_id.o\
	$(RT28xx_DIR)/os/linux/rt_usb_util.o\
	$(RT28xx_DIR)/os/linux/usb_main_dev.o
endif
endif
#endif // RT3070 //

#ifdef RT2880
ifneq ($(findstring 2880,$(CHIPSET)),)
rt$(MODULE)sta-objs += \
	$(RT28xx_DIR)/os/linux/rbus_main_dev.o\
	$(RT28xx_DIR)/os/linux/rt_pci_rbus.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_util.o\
	$(RT28xx_DIR)/common/cmm_mac_pci.o\
	$(RT28xx_DIR)/common/cmm_data_pci.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_drv.o\
	$(RT28xx_DIR)/common/ee_flash.o\
	$(RT28xx_DIR)/common/rtmp_swmcu.o\
	$(RT28xx_DIR)/chips/rt2880.o
endif
ifeq ($(HAS_ATE),y)
rt$(MODULE)sta-objs += \
	$(RT28xx_DIR)/ate/common/rt_ate.o\
	$(RT28xx_DIR)/ate/common/ate_pci.o\
	$(RT28xx_DIR)/ate/chips/rt28xx_ate.o
endif
ifeq ($(HAS_QA_SUPPORT),y)
rt$(MODULE)sta-objs += \
	$(RT28xx_DIR)/ate/common/rt_qa.o
endif
#endif // RT2880 //

#ifdef RT35xx
ifneq ($(findstring 3572,$(CHIPSET)),)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_usb.o\
	$(RT28xx_DIR)/common/rtusb_io.o\
	$(RT28xx_DIR)/common/rtusb_data.o\
	$(RT28xx_DIR)/common/cmm_data_usb.o\
	$(RT28xx_DIR)/common/ee_prom.o\
	$(RT28xx_DIR)/common/ee_efuse.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o\
	$(RT28xx_DIR)/chips/rt30xx.o\
	$(RT28xx_DIR)/common/rt_rf.o\
	$(RT28xx_DIR)/common/rtusb_bulk.o\
	$(RT28xx_DIR)/os/linux/rt_usb.o\
	$(RT28xx_DIR)/chips/rt28xx.o\
	$(RT28xx_DIR)/chips/rt35xx.o

ifeq ($(HAS_RTMP_FLASH_SUPPORT),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/common/ee_flash.o
endif

ifeq ($(HAS_ATE),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt28xx_ate.o\
	$(RT28xx_DIR)/ate/chips/rt35xx_ate.o\
	$(RT28xx_DIR)/ate/common/ate_usb.o
endif

ifeq ($(OSABL),NO)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/common/rtusb_dev_id.o\
	$(RT28xx_DIR)/os/linux/rt_usb_util.o\
	$(RT28xx_DIR)/os/linux/usb_main_dev.o
endif
endif

ifneq ($(findstring 3573,$(CHIPSET)),)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_usb.o\
	$(RT28xx_DIR)/common/rtusb_io.o\
	$(RT28xx_DIR)/common/rtusb_data.o\
	$(RT28xx_DIR)/common/cmm_data_usb.o\
	$(RT28xx_DIR)/common/ee_prom.o\
	$(RT28xx_DIR)/common/ee_efuse.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o\
	$(RT28xx_DIR)/common/frq_cal.o\
	$(RT28xx_DIR)/chips/rt30xx.o\
	$(RT28xx_DIR)/common/rt_rf.o\
	$(RT28xx_DIR)/common/rtusb_bulk.o\
	$(RT28xx_DIR)/os/linux/rt_usb.o\
	$(RT28xx_DIR)/chips/rt35xx.o\
	$(RT28xx_DIR)/chips/rt3593.o

ifeq ($(HAS_ATE),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt3593_ate.o\
	$(RT28xx_DIR)/ate/common/ate_usb.o
endif

ifeq ($(OSABL),NO)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/common/rtusb_dev_id.o\
	$(RT28xx_DIR)/os/linux/rt_usb_util.o\
	$(RT28xx_DIR)/os/linux/usb_main_dev.o
endif
endif

ifneq ($(findstring 3062,$(CHIPSET)),)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_pci.o\
	$(RT28xx_DIR)/common/cmm_data_pci.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_drv.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o\
	$(RT28xx_DIR)/common/ee_prom.o\
	$(RT28xx_DIR)/common/ee_efuse.o\
	$(RT28xx_DIR)/common/rt_rf.o\
	$(RT28xx_DIR)/chips/rt30xx.o\
	$(RT28xx_DIR)/chips/rt35xx.o

ifeq ($(HAS_ATE),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt35xx_ate.o\
	$(RT28xx_DIR)/ate/common/ate_pci.o
endif

ifeq ($(OSABL),NO)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/os/linux/rt_pci_rbus.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_util.o\
	$(RT28xx_DIR)/os/linux/pci_main_dev.o
endif
endif

ifneq ($(findstring 3562,$(CHIPSET)),)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_pci.o\
	$(RT28xx_DIR)/common/cmm_data_pci.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o\
	$(RT28xx_DIR)/common/ee_prom.o\
	$(RT28xx_DIR)/common/ee_efuse.o\
	$(RT28xx_DIR)/common/rt_rf.o\
	$(RT28xx_DIR)/chips/rt28xx.o\
	$(RT28xx_DIR)/chips/rt30xx.o\
	$(RT28xx_DIR)/chips/rt35xx.o

ifeq ($(HAS_ATE),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt28xx_ate.o\
	$(RT28xx_DIR)/ate/chips/rt35xx_ate.o\
	$(RT28xx_DIR)/ate/common/ate_pci.o
endif

ifeq ($(OSABL),NO)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/os/linux/rt_pci_rbus.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_util.o\
	$(RT28xx_DIR)/os/linux/pci_main_dev.o
endif
endif
#endif // RT35xx //

ifneq ($(findstring 3593,$(CHIPSET)),)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_pci.o\
	$(RT28xx_DIR)/common/cmm_data_pci.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_drv.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o\
	$(RT28xx_DIR)/common/ee_prom.o\
	$(RT28xx_DIR)/common/ee_efuse.o\
	$(RT28xx_DIR)/common/rt_rf.o\
	$(RT28xx_DIR)/common/frq_cal.o\
	$(RT28xx_DIR)/chips/rt30xx.o\
	$(RT28xx_DIR)/chips/rt35xx.o\
	$(RT28xx_DIR)/chips/rt28xx.o\
	$(RT28xx_DIR)/chips/rt3593.o

ifeq ($(HAS_ATE),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt3593_ate.o\
	$(RT28xx_DIR)/ate/common/ate_pci.o
endif

ifeq ($(OSABL),NO)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/os/linux/rt_pci_rbus.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_util.o\
	$(RT28xx_DIR)/os/linux/pci_main_dev.o
endif
endif

ifneq ($(findstring 3390,$(CHIPSET)),)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_pci.o\
	$(RT28xx_DIR)/common/cmm_data_pci.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_drv.o\
	$(RT28xx_DIR)/common/ee_prom.o\
	$(RT28xx_DIR)/common/ee_efuse.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o\
	$(RT28xx_DIR)/common/rt_rf.o\
	$(RT28xx_DIR)/chips/rt30xx.o\
	$(RT28xx_DIR)/chips/rt3090.o\
	$(RT28xx_DIR)/chips/rt33xx.o\
	$(RT28xx_DIR)/chips/rt3390.o

ifeq ($(HAS_ATE),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt33xx_ate.o\
	$(RT28xx_DIR)/ate/chips/rt30xx_ate.o\
	$(RT28xx_DIR)/ate/common/ate_pci.o
endif

ifeq ($(OSABL),NO)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/os/linux/rt_pci_rbus.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_util.o\
	$(RT28xx_DIR)/os/linux/pci_main_dev.o
endif
endif

#ifdef RT3370
ifneq ($(findstring 3370,$(CHIPSET)),)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_usb.o\
	$(RT28xx_DIR)/common/rtusb_io.o\
	$(RT28xx_DIR)/common/rtusb_data.o\
	$(RT28xx_DIR)/common/cmm_data_usb.o\
	$(RT28xx_DIR)/common/rtusb_bulk.o\
	$(RT28xx_DIR)/common/ee_prom.o\
	$(RT28xx_DIR)/common/ee_efuse.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o\
	$(RT28xx_DIR)/common/rt_rf.o\
	$(RT28xx_DIR)/os/linux/rt_usb.o\
	$(RT28xx_DIR)/chips/rt3070.o\
	$(RT28xx_DIR)/chips/rt30xx.o\
	$(RT28xx_DIR)/chips/rt33xx.o\
	$(RT28xx_DIR)/chips/rt3370.o

ifeq ($(HAS_ATE),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt33xx_ate.o\
	$(RT28xx_DIR)/ate/chips/rt30xx_ate.o\
	$(RT28xx_DIR)/ate/common/ate_usb.o
endif

ifeq ($(OSABL),NO)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/common/rtusb_dev_id.o\
	$(RT28xx_DIR)/os/linux/rt_usb_util.o\
	$(RT28xx_DIR)/os/linux/usb_main_dev.o
endif
endif
#endif // RT3370 //

#ifdef RT5390
ifneq ($(findstring 5390,$(CHIPSET)),)
RT28XX_STA_OBJ += \
        $(RT28xx_DIR)/common/cmm_mac_pci.o\
        $(RT28xx_DIR)/common/cmm_data_pci.o\
        $(RT28xx_DIR)/os/linux/rt_rbus_pci_drv.o\
        $(RT28xx_DIR)/common/ee_prom.o\
        $(RT28xx_DIR)/common/ee_efuse.o\
        $(RT28xx_DIR)/common/rtmp_mcu.o\
        $(RT28xx_DIR)/common/rt_rf.o\
        $(RT28xx_DIR)/chips/rt30xx.o\
        $(RT28xx_DIR)/chips/rt3090.o\
        $(RT28xx_DIR)/chips/rt33xx.o\
        $(RT28xx_DIR)/chips/rt3390.o\
	$(RT28xx_DIR)/chips/rt5390.o

ifeq ($(HAS_ATE),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt5390_ate.o\
	$(RT28xx_DIR)/ate/chips/rt33xx_ate.o\
	$(RT28xx_DIR)/ate/chips/rt30xx_ate.o\
	$(RT28xx_DIR)/ate/common/ate_pci.o
endif

ifeq ($(OSABL),NO)
RT28XX_STA_OBJ += \
        $(RT28xx_DIR)/os/linux/rt_pci_rbus.o\
        $(RT28xx_DIR)/os/linux/rt_rbus_pci_util.o\
        $(RT28xx_DIR)/os/linux/pci_main_dev.o
endif
endif
#endif // RT5390 //

#ifdef RT5370
ifneq ($(findstring 5370,$(CHIPSET)),)
RT28XX_STA_OBJ += \
        $(RT28xx_DIR)/common/cmm_mac_usb.o\
        $(RT28xx_DIR)/common/rtusb_io.o\
        $(RT28xx_DIR)/common/rtusb_data.o\
        $(RT28xx_DIR)/common/cmm_data_usb.o\
        $(RT28xx_DIR)/common/rtusb_bulk.o\
        $(RT28xx_DIR)/common/ee_prom.o\
        $(RT28xx_DIR)/common/ee_efuse.o\
        $(RT28xx_DIR)/common/rtmp_mcu.o\
        $(RT28xx_DIR)/common/rt_rf.o\
	$(RT28xx_DIR)/os/linux/rt_usb.o\
        $(RT28xx_DIR)/chips/rt3070.o\
        $(RT28xx_DIR)/chips/rt30xx.o\
        $(RT28xx_DIR)/chips/rt33xx.o\
        $(RT28xx_DIR)/chips/rt3370.o\
	$(RT28xx_DIR)/chips/rt5390.o

ifeq ($(HAS_ATE),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt5390_ate.o\
	$(RT28xx_DIR)/ate/chips/rt33xx_ate.o\
	$(RT28xx_DIR)/ate/chips/rt30xx_ate.o\
	$(RT28xx_DIR)/ate/common/ate_usb.o
endif

ifeq ($(OSABL),NO)
RT28XX_STA_OBJ += \
        $(RT28xx_DIR)/common/rtusb_dev_id.o\
        $(RT28xx_DIR)/os/linux/rt_usb_util.o\
        $(RT28xx_DIR)/os/linux/usb_main_dev.o
endif
endif
#endif // RT5370 //

#ifdef RT5572
ifneq ($(findstring 5572,$(CHIPSET)),)
RT28XX_STA_OBJ += \
		$(RT28xx_DIR)/common/cmm_mac_usb.o\
		$(RT28xx_DIR)/common/rtusb_io.o\
		$(RT28xx_DIR)/common/rtusb_data.o\
		$(RT28xx_DIR)/common/cmm_data_usb.o\
		$(RT28xx_DIR)/common/rtusb_bulk.o\
		$(RT28xx_DIR)/common/ee_prom.o\
		$(RT28xx_DIR)/common/ee_efuse.o\
		$(RT28xx_DIR)/common/rtmp_mcu.o\
		$(RT28xx_DIR)/common/frq_cal.o\
		$(RT28xx_DIR)/common/rt_rf.o\
		$(RT28xx_DIR)/os/linux/rt_usb.o\
		$(RT28xx_DIR)/chips/rt30xx.o\
		$(RT28xx_DIR)/chips/rt5592.o

ifeq ($(HAS_RTMP_FLASH_SUPPORT),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/common/ee_flash.o
endif

ifeq ($(HAS_ATE),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt5592_ate.o\
	$(RT28xx_DIR)/ate/common/ate_usb.o
endif

ifeq ($(OSABL),NO)
RT28XX_STA_OBJ += \
        $(RT28xx_DIR)/common/rtusb_dev_id.o\
        $(RT28xx_DIR)/os/linux/rt_usb_util.o\
        $(RT28xx_DIR)/os/linux/usb_main_dev.o
endif
endif
#endif // RT5572 //

#ifdef RTMP_MAC_PCI
#ifdef RT5592
ifneq ($(findstring 5592,$(CHIPSET)),)
RT28XX_STA_OBJ += \
		$(RT28xx_DIR)/common/cmm_mac_pci.o\
		$(RT28xx_DIR)/common/cmm_data_pci.o\
		$(RT28xx_DIR)/common/rt_rbus_pci_drv.o\
		$(RT28xx_DIR)/common/ee_prom.o\
		$(RT28xx_DIR)/common/frq_cal.o\
		$(RT28xx_DIR)/common/ee_efuse.o\
		$(RT28xx_DIR)/common/rtmp_mcu.o\
		$(RT28xx_DIR)/common/rt_rf.o\
		$(RT28xx_DIR)/chips/rt30xx.o\
		$(RT28xx_DIR)/chips/rt5592.o

ifeq ($(HAS_RTMP_FLASH_SUPPORT),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/common/ee_flash.o
endif

ifeq ($(HAS_ATE),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt5592_ate.o\
	$(RT28xx_DIR)/ate/common/ate_pci.o
endif

ifeq ($(OSABL),NO)
RT28XX_STA_OBJ += \
        $(RT28xx_DIR)/os/rt_pci_rbus.o\
        $(RT28xx_DIR)/os/linux/rt_rbus_pci_util.o\
        $(RT28xx_DIR)/os/linux/pci_main_dev.o
endif
endif
#endif // RT5592 //
#endif // RTMP_MAC_PCI //

#ifdef WMM_ACM_SUPPORT
ifeq ($(HAS_WMM_ACM_SUPPORT),y)
RT28XX_STA_OBJ += $(RT28xx_DIR)/common/acm_edca.o\
	$(RT28xx_DIR)/common/acm_comm.o\
	$(RT28xx_DIR)/common/acm_iocl.o
endif
#endif // WMM_ACM_SUPPORT //

#ifdef MESH_SUPPORT
ifeq ($(HAS_MESH_SUPPORT),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/common/mesh_bmpkt.o \
	$(RT28xx_DIR)/common/mesh_ctrl.o \
	$(RT28xx_DIR)/common/mesh_link_mng.o \
	$(RT28xx_DIR)/common/mesh_sanity.o \
	$(RT28xx_DIR)/common/mesh_tlv.o \
	$(RT28xx_DIR)/common/mesh.o \
	$(RT28xx_DIR)/common/mesh_forwarding.o \
	$(RT28xx_DIR)/common/mesh_path_mng.o

ifeq ($(OSABL),NO)
RT28XX_STA_OBJ += \
	../../common/mesh_inf.o
endif
endif
#endif // MESH_SUPPORT //

#ifdef WAPI_SUPPORT
ifeq ($(HAS_WAPI_SUPPORT),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/common/wapi.o
endif
#endif // WAPI_SUPPORT //

#ifdef DOT11R_FT_SUPPORT
ifeq ($(HAS_DOT11R_FT_SUPPORT),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/common/ft.o\
	$(RT28xx_DIR)/common/ft_tlv.o\
	$(RT28xx_DIR)/common/ft_iocl.o\
	$(RT28xx_DIR)/common/ft_rc.o\
	$(RT28xx_DIR)/sta/ft_auth.o\
	$(RT28xx_DIR)/sta/ft_action.o
endif
#endif // DOT11R_FT_SUPPORT //

#ifdef BT_COEXISTENCE_SUPPORT
#ifdef RELEASE_EXCLUDE
ifeq ($(HAS_BT_COEXISTENCE_SUPPORT),y)
#endif //RELEASE_EXCLUDE //
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/common/misc.o
#ifdef RELEASE_EXCLUDE
endif
#endif //RELEASE_EXCLUDE //
#endif // BT_COEXISTENCE_SUPPORT //

#ifdef P2P_SUPPORT
ifeq ($(OSABL),NO)
ifeq ($(HAS_P2P_SUPPORT),y)
RT28XX_STA_OBJ += \
        $(RT28xx_DIR)/common/p2p_inf.o
endif
endif

ifeq ($(HAS_P2P_SUPPORT),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/ap/ap_mbss.o\
	$(RT28xx_DIR)/ap/ap.o\
	$(RT28xx_DIR)/ap/ap_assoc.o\
	$(RT28xx_DIR)/ap/ap_auth.o\
	$(RT28xx_DIR)/ap/ap_connect.o\
	$(RT28xx_DIR)/ap/ap_mlme.o\
	$(RT28xx_DIR)/ap/ap_sanity.o\
	$(RT28xx_DIR)/ap/ap_sync.o\
	$(RT28xx_DIR)/ap/ap_wpa.o\
	$(RT28xx_DIR)/ap/ap_data.o\
	$(RT28xx_DIR)/common/uapsd.o\
	$(RT28xx_DIR)/ap/ap_autoChSel.o\
	$(RT28xx_DIR)/ap/ap_qload.o\
	$(RT28xx_DIR)/sta/p2pcli.o \
	$(RT28xx_DIR)/sta/p2pcli_ctrl.o \
	$(RT28xx_DIR)/sta/p2pcli_sync.o \
	$(RT28xx_DIR)/sta/p2pcli_auth.o \
	$(RT28xx_DIR)/sta/p2pcli_assoc.o \
	$(RT28xx_DIR)/common/cmm_mat.o \
	$(RT28xx_DIR)/common/cmm_mat_iparp.o \
	$(RT28xx_DIR)/common/cmm_mat_pppoe.o \
	$(RT28xx_DIR)/common/cmm_mat_ipv6.o \
	$(RT28xx_DIR)/common/p2p_dbg.o\
	$(RT28xx_DIR)/common/p2p.o\
	$(RT28xx_DIR)/common/p2p_packet.o\
	$(RT28xx_DIR)/common/p2p_action.o\
	$(RT28xx_DIR)/common/p2p_table.o\
	$(RT28xx_DIR)/common/p2p_ctrl.o\
	$(RT28xx_DIR)/common/p2p_disc_mng.o\
	$(RT28xx_DIR)/common/p2p_nego_mng.o\
	$(RT28xx_DIR)/common/p2p_dbg.o\
	$(RT28xx_DIR)/common/p2p.o\
	$(RT28xx_DIR)/common/p2p_packet.o\
	$(RT28xx_DIR)/common/p2p_action.o\
	$(RT28xx_DIR)/common/p2p_table.o\
	$(RT28xx_DIR)/common/p2p_ctrl.o\
	$(RT28xx_DIR)/common/p2p_disc_mng.o\
	$(RT28xx_DIR)/common/p2p_nego_mng.o\
	$(RT28xx_DIR)/common/p2p_cfg.o\
	$(RT28xx_DIR)/common/wsc.o\
	$(RT28xx_DIR)/common/wsc_tlv.o\
	$(RT28xx_DIR)/common/wsc_ufd.o\
	$(RT28xx_DIR)/common/crypt_biginteger.o\
	$(RT28xx_DIR)/common/crypt_dh.o	

ifeq ($(HAS_QOS_DLS_SUPPORT),y)
RT28XX_STA_OBJ += $(RT28xx_DIR)/ap/ap_dls.o
endif

endif

ifeq ($(HAS_P2P_SUPPORT),y)
ifeq ($(OSABL),NO)
RT28XX_STA_OBJ += \
        $(RT28xx_DIR)/ap/ap_mbss_inf.o\
        $(RT28xx_DIR)/common/rt_os_util.o\
        $(RT28xx_DIR)/os/linux/ap_ioctl.o\
        $(RT28xx_DIR)/os/linux/sta_ioctl.o\
        $(RT28xx_DIR)/os/linux/rt_linux.o\
        $(RT28xx_DIR)/os/linux/rt_main_dev.o
else
rt$(MODULE)sta-objs += \
        ../../os/linux/rt_symb.o
endif
endif
#endif // P2P_SUPPORT //

#endif // CONFIG_STA_SUPPORT //

#ifdef CONFIG_APSTA_SUPPORT
RT28XX_APSTA_OBJ := \
	$(RT28xx_DIR)/common/crypt_md5.o\
	$(RT28xx_DIR)/common/crypt_sha2.o\
	$(RT28xx_DIR)/common/crypt_hmac.o\
	$(RT28xx_DIR)/common/crypt_aes.o\
	$(RT28xx_DIR)/common/crypt_arc4.o\
	$(RT28xx_DIR)/common/mlme.o\
	$(RT28xx_DIR)/common/cmm_wep.o\
	$(RT28xx_DIR)/common/action.o\
	$(RT28xx_DIR)/common/cmm_data.o\
	$(RT28xx_DIR)/common/rtmp_init.o\
	$(RT28xx_DIR)/common/cmm_tkip.o\
	$(RT28xx_DIR)/common/cmm_aes.o\
	$(RT28xx_DIR)/common/cmm_sync.o\
	$(RT28xx_DIR)/common/eeprom.o\
	$(RT28xx_DIR)/common/cmm_sanity.o\
	$(RT28xx_DIR)/common/cmm_info.o\
	$(RT28xx_DIR)/common/cmm_cfg.o\
	$(RT28xx_DIR)/common/cmm_wpa.o\
	$(RT28xx_DIR)/common/cmm_wpa_adhoc.o\
	$(RT28xx_DIR)/common/dfs.o\
	$(RT28xx_DIR)/common/spectrum.o\
	$(RT28xx_DIR)/common/rtmp_timer.o\
	$(RT28xx_DIR)/common/rt_channel.o\
	$(RT28xx_DIR)/common/cmm_profile.o\
	$(RT28xx_DIR)/common/cmm_asic.o\
	$(RT28xx_DIR)/common/cmm_cmd.o\
	$(RT28xx_DIR)/rate_ctrl/ra_ctrl.o\
	$(RT28xx_DIR)/rate_ctrl/alg_legacy.o\
	$(RT28xx_DIR)/ap/ap.o\
	$(RT28xx_DIR)/ap/ap_assoc.o\
	$(RT28xx_DIR)/ap/ap_auth.o\
	$(RT28xx_DIR)/ap/ap_connect.o\
	$(RT28xx_DIR)/ap/ap_mlme.o\
	$(RT28xx_DIR)/ap/ap_sanity.o\
	$(RT28xx_DIR)/ap/ap_sync.o\
	$(RT28xx_DIR)/ap/ap_wpa.o\
	$(RT28xx_DIR)/ap/ap_data.o\
	$(RT28xx_DIR)/common/uapsd.o\
	$(RT28xx_DIR)/sta/assoc.o\
	$(RT28xx_DIR)/sta/auth.o\
	$(RT28xx_DIR)/sta/auth_rsp.o\
	$(RT28xx_DIR)/sta/sync.o\
	$(RT28xx_DIR)/sta/sanity.o\
	$(RT28xx_DIR)/sta/rtmp_data.o\
	$(RT28xx_DIR)/sta/connect.o\
	$(RT28xx_DIR)/sta/wpa.o\
	$(RT28xx_DIR)/sta/sta_cfg.o\
	$(RT28xx_DIR)/ap/ap_autoChSel.o\
	$(RT28xx_DIR)/ap/ap_qload.o\
	$(RT28xx_DIR)/ap/ap_cfg.o

ifeq ($(OSABL),NO)
RT28XX_APSTA_OBJ += \
	$(RT28xx_DIR)/common/rtmp_init_inf.o\
	$(RT28xx_DIR)/ap/ap_mbss.o\
	$(RT28xx_DIR)/os/linux/rt_profile.o\
	$(RT28xx_DIR)/os/linux/ap_ioctl.o\
	$(RT28xx_DIR)/os/linux/sta_ioctl.o\
	$(RT28xx_DIR)/os/linux/rt_linux.o\
	$(RT28xx_DIR)/os/linux/rt_main_dev.o
endif

ifeq ($(HAS_NEW_RATE_ADAPT_SUPPORT),y)
RT28XX_APSTA_OBJS += $(RT28xx_DIR)/rate_ctrl/alg_grp.o
endif

#ifdef DOT11_N_SUPPORT
ifeq ($(HAS_DOT11_N_SUPPORT),y)
RT28XX_APSTA_OBJ += \
	$(RT28xx_DIR)/common/ba_action.o

#ifdef TXBF_SUPPORT
ifeq ($(HAS_TXBF_SUPPORT),y)
rt$(MODULE)apsta-objs += \
	$(RT28xx_DIR)/common/cmm_txbf.o\
	$(RT28xx_DIR)/common/cmm_txbf_cal.o
endif
#endif // TXBF_SUPPORT //
endif
#endif // DOT11_N_SUPPORT //

#ifdef WMM_ACM_SUPPORT
ifeq ($(HAS_WMM_ACM_SUPPORT),y)
RT28XX_APSTA_OBJ += $(RT28xx_DIR)/common/acm_edca.o\
	$(RT28xx_DIR)/common/acm_comm.o\
	$(RT28xx_DIR)/common/acm_iocl.o
endif
#endif // WMM_ACM_SUPPORT //

#ifdef LED_CONTROL_SUPPORT
ifeq ($(HAS_LED_CONTROL_SUPPORT),y)
RT28XX_APSTA_OBJ += \
	$(RT28xx_DIR)/common/rt_led.o
endif
#endif // LED_CONTROL_SUPPORT //

#ifdef RT2860
ifneq ($(findstring 2860,$(CHIPSET)),)
RT28XX_APSTA_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_pci.o\
	$(RT28xx_DIR)/common/cmm_data_pci.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o\
	$(RT28xx_DIR)/common/ee_prom.o

ifeq ($(OSABL),NO)
RT28XX_APSTA_OBJ += \
	$(RT28xx_DIR)/os/linux/rt_pci_rbus.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_util.o\
	$(RT28xx_DIR)/os/linux/pci_main_dev.o
endif
endif
#endif // RT2860 //

#ifdef RT3090
ifneq ($(findstring 3090,$(CHIPSET)),)
RT28XX_APSTA_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_pci.o\
	$(RT28xx_DIR)/common/cmm_data_pci.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o\
	$(RT28xx_DIR)/common/ee_prom.o\
	$(RT28xx_DIR)/chips/rt30xx.o\
	$(RT28xx_DIR)/common/rt_rf.o\
	$(RT28xx_DIR)/chips/rt3090.o

ifeq ($(OSABL),NO)
RT28XX_APSTA_OBJ += \
	$(RT28xx_DIR)/os/linux/rt_pci_rbus.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_util.o\
	$(RT28xx_DIR)/os/linux/pci_main_dev.o
endif
endif
#endif // RT3090 //

#ifdef RT2870
ifneq ($(findstring 2870,$(CHIPSET)),)
RT28XX_APSTA_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_usb.o\
	$(RT28xx_DIR)/common/rtusb_io.o\
	$(RT28xx_DIR)/common/rtusb_bulk.o\
	$(RT28xx_DIR)/common/rtusb_data.o\
	$(RT28xx_DIR)/common/cmm_data_usb.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o\
	$(RT28xx_DIR)/common/ee_prom.o\
	$(RT28xx_DIR)/chips/rt28xx.o

ifeq ($(OSABL),NO)
RT28XX_APSTA_OBJ += \
	$(RT28xx_DIR)/common/rtusb_dev_id.o\
	$(RT28xx_DIR)/os/linux/rt_usb.o\
	$(RT28xx_DIR)/os/linux/rt_usb_util.o\
	$(RT28xx_DIR)/os/linux/usb_main_dev.o
endif
endif
#endif // RT2870 //

#ifdef RT3070
ifneq ($(findstring 2070,$(CHIPSET)),)
RT28XX_APSTA_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_usb.o\
	$(RT28xx_DIR)/common/rtusb_io.o\
	$(RT28xx_DIR)/common/rtusb_bulk.o\
	$(RT28xx_DIR)/common/rtusb_data.o\
	$(RT28xx_DIR)/common/cmm_data_usb.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o\
	$(RT28xx_DIR)/common/ee_prom.o\
	$(RT28xx_DIR)/common/ee_efuse.o\
	$(RT28xx_DIR)/os/linux/rt_usb.o\
	$(RT28xx_DIR)/chips/rt30xx.o\
	$(RT28xx_DIR)/common/rt_rf.o\
	$(RT28xx_DIR)/chips/rt3070.o

ifeq ($(OSABL),NO)
RT28XX_APSTA_OBJ += \
	$(RT28xx_DIR)/common/rtusb_dev_id.o\
	$(RT28xx_DIR)/os/linux/rt_usb_util.o\
	$(RT28xx_DIR)/os/linux/usb_main_dev.o
endif
endif

ifneq ($(findstring 3070,$(CHIPSET)),)
RT28XX_APSTA_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_usb.o\
	$(RT28xx_DIR)/common/rtusb_io.o\
	$(RT28xx_DIR)/common/rtusb_bulk.o\
	$(RT28xx_DIR)/common/rtusb_data.o\
	$(RT28xx_DIR)/common/cmm_data_usb.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o\
	$(RT28xx_DIR)/common/ee_prom.o\
	$(RT28xx_DIR)/common/ee_efuse.o\
	$(RT28xx_DIR)/os/linux/rt_usb.o\
	$(RT28xx_DIR)/chips/rt30xx.o\
	$(RT28xx_DIR)/common/rt_rf.o\
	$(RT28xx_DIR)/chips/rt3070.o

ifeq ($(OSABL),NO)
RT28XX_APSTA_OBJ += \
	$(RT28xx_DIR)/common/rtusb_dev_id.o\
	$(RT28xx_DIR)/os/linux/rt_usb_util.o\
	$(RT28xx_DIR)/os/linux/usb_main_dev.o
endif
endif
#endif // RT3070 //

#ifdef RT3370
ifneq ($(findstring 3370,$(CHIPSET)),)
RT28XX_APSTA_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_usb.o\
	$(RT28xx_DIR)/common/rtusb_io.o\
	$(RT28xx_DIR)/common/rtusb_bulk.o\
	$(RT28xx_DIR)/common/rtusb_data.o\
	$(RT28xx_DIR)/common/cmm_data_usb.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o\
	$(RT28xx_DIR)/common/ee_prom.o\
	$(RT28xx_DIR)/common/ee_efuse.o\
	$(RT28xx_DIR)/os/linux/rt_usb.o\
	$(RT28xx_DIR)/chips/rt30xx.o\
	$(RT28xx_DIR)/chips/rt33xx.o\
	$(RT28xx_DIR)/common/rt_rf.o\
	$(RT28xx_DIR)/chips/rt3370.o

ifeq ($(HAS_ATE),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt33xx_ate.o\
	$(RT28xx_DIR)/ate/chips/rt30xx_ate.o\
	$(RT28xx_DIR)/ate/common/ate_usb.o
endif
ifeq ($(OSABL),NO)
RT28XX_APSTA_OBJ += \
	$(RT28xx_DIR)/common/rtusb_dev_id.o\
	$(RT28xx_DIR)/os/linux/rt_usb_util.o\
	$(RT28xx_DIR)/os/linux/usb_main_dev.o
endif
endif
#endif // RT3370 //


#ifdef RT3390
ifneq ($(findstring 3390,$(CHIPSET)),)
RT28XX_APSTA_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_pci.o\
	$(RT28xx_DIR)/common/cmm_data_pci.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o\
	$(RT28xx_DIR)/common/ee_prom.o\
	$(RT28xx_DIR)/chips/rt30xx.o\
	$(RT28xx_DIR)/chips/rt3090.o\
	$(RT28xx_DIR)/chips/rt33xx.o\
	$(RT28xx_DIR)/common/rt_rf.o\
	$(RT28xx_DIR)/chips/rt3390.o

ifeq ($(HAS_ATE),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt33xx_ate.o\
	$(RT28xx_DIR)/ate/chips/rt30xx_ate.o\
	$(RT28xx_DIR)/ate/common/ate_pci.o
endif
ifeq ($(OSABL),NO)
RT28XX_APSTA_OBJ += \
	$(RT28xx_DIR)/os/linux/rt_pci_rbus.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_util.o\
	$(RT28xx_DIR)/os/linux/pci_main_dev.o
endif
endif
#endif // RT3390 //

ifneq ($(findstring 3573,$(CHIPSET)),)
RT28XX_APSTA_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_usb.o\
	$(RT28xx_DIR)/common/rtusb_io.o\
	$(RT28xx_DIR)/common/rtusb_data.o\
	$(RT28xx_DIR)/common/cmm_data_usb.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o\
	$(RT28xx_DIR)/common/ee_prom.o\
	$(RT28xx_DIR)/common/ee_efuse.o\
	$(RT28xx_DIR)/common/rt_rf.o\
	$(RT28xx_DIR)/common/rtusb_bulk.o\
	$(RT28xx_DIR)/common/frq_cal.o\
	$(RT28xx_DIR)/os/linux/rt_usb.o\
	$(RT28xx_DIR)/chips/rt28xx.o\
	$(RT28xx_DIR)/chips/rt30xx.o\
	$(RT28xx_DIR)/chips/rt35xx.o\
	$(RT28xx_DIR)/chips/rt3593.o

ifeq ($(OSABL),NO)
RT28XX_APSTA_OBJ += \
	$(RT28xx_DIR)/common/rtusb_dev_id.o\
	$(RT28xx_DIR)/os/linux/rt_usb_util.o\
	$(RT28xx_DIR)/os/linux/usb_main_dev.o
endif
ifeq ($(HAS_DFS_SUPPORT),y)
RT28XX_APSTA_OBJ += \
	$(RT28xx_DIR)/common/dfs_mcu.o
endif
endif

ifneq ($(findstring 3593,$(CHIPSET)),)
RT28XX_APSTA_OBJ += \
	$(RT28xx_DIR)/common/cmm_mac_pci.o\
	$(RT28xx_DIR)/common/cmm_data_pci.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_drv.o\
	$(RT28xx_DIR)/common/rtmp_mcu.o\
	$(RT28xx_DIR)/common/ee_prom.o\
	$(RT28xx_DIR)/common/ee_efuse.o\
	$(RT28xx_DIR)/common/rt_rf.o\
	$(RT28xx_DIR)/common/frq_cal.o\
	$(RT28xx_DIR)/chips/rt30xx.o\
	$(RT28xx_DIR)/chips/rt35xx.o\
	$(RT28xx_DIR)/chips/rt28xx.o\
	$(RT28xx_DIR)/chips/rt3593.o

ifeq ($(OSABL),NO)
RT28XX_APSTA_OBJ += \
	$(RT28xx_DIR)/os/linux/rt_pci_rbus.o\
	$(RT28xx_DIR)/os/linux/rt_rbus_pci_util.o\
	$(RT28xx_DIR)/os/linux/pci_main_dev.o
endif
ifeq ($(HAS_DFS_SUPPORT),y)
RT28XX_APSTA_OBJ += \
	$(RT28xx_DIR)/common/dfs_mcu.o
endif
endif

#ifdef RT5370
ifneq ($(findstring 5370,$(CHIPSET)),)
RT28XX_APSTA_OBJ += \
        $(RT28xx_DIR)/common/cmm_mac_usb.o\
        $(RT28xx_DIR)/common/rtusb_io.o\
        $(RT28xx_DIR)/common/rtusb_bulk.o\
        $(RT28xx_DIR)/common/rtusb_data.o\
        $(RT28xx_DIR)/common/cmm_data_usb.o\
        $(RT28xx_DIR)/common/rtmp_mcu.o\
        $(RT28xx_DIR)/common/ee_prom.o\
        $(RT28xx_DIR)/common/ee_efuse.o\
        $(RT28xx_DIR)/os/linux/rt_usb.o\
        $(RT28xx_DIR)/chips/rt30xx.o\
        $(RT28xx_DIR)/chips/rt33xx.o\
        $(RT28xx_DIR)/common/rt_rf.o\
        $(RT28xx_DIR)/chips/rt3370.o\
	$(RT28xx_DIR)/chips/rt5370.o

ifeq ($(OSABL),NO)
RT28XX_APSTA_OBJ += \
        $(RT28xx_DIR)/common/rtusb_dev_id.o\
        $(RT28xx_DIR)/os/linux/rt_usb_util.o\
        $(RT28xx_DIR)/os/linux/usb_main_dev.o
endif
endif
#endif // RT5370 //

#ifdef RT5390
ifneq ($(findstring 5390,$(CHIPSET)),)
RT28XX_APSTA_OBJ += \
        $(RT28xx_DIR)/common/cmm_mac_pci.o\
        $(RT28xx_DIR)/common/cmm_data_pci.o\
        $(RT28xx_DIR)/common/rtmp_mcu.o\
        $(RT28xx_DIR)/common/ee_prom.o\
        $(RT28xx_DIR)/chips/rt30xx.o\
        $(RT28xx_DIR)/chips/rt3090.o\
        $(RT28xx_DIR)/chips/rt33xx.o\
        $(RT28xx_DIR)/common/rt_rf.o\
        $(RT28xx_DIR)/chips/rt3390.o\
	$(RT28xx_DIR)/chips/rt5390.o

ifeq ($(HAS_ATE),y)
RT28XX_STA_OBJ += \
	$(RT28xx_DIR)/ate/chips/rt5390_ate.o\
	$(RT28xx_DIR)/ate/chips/rt33xx_ate.o\
	$(RT28xx_DIR)/ate/chips/rt30xx_ate.o\
	$(RT28xx_DIR)/ate/common/ate_usb.o
endif
ifeq ($(OSABL),NO)
RT28XX_APSTA_OBJ += \
        $(RT28xx_DIR)/os/linux/rt_pci_rbus.o\
        $(RT28xx_DIR)/os/linux/rt_rbus_pci_util.o\
        $(RT28xx_DIR)/os/linux/pci_main_dev.o
endif
endif
#endif // RT5390 //

#ifdef RT5572
ifneq ($(findstring 5572,$(CHIPSET)),)
RT28XX_APSTA_OBJ += \
		$(RT28xx_DIR)/common/cmm_mac_usb.o\
		$(RT28xx_DIR)/common/rtusb_io.o\
		$(RT28xx_DIR)/common/rtusb_data.o\
		$(RT28xx_DIR)/common/cmm_data_usb.o\
		$(RT28xx_DIR)/common/rtusb_bulk.o\
		$(RT28xx_DIR)/common/ee_prom.o\
		$(RT28xx_DIR)/common/ee_efuse.o\
		$(RT28xx_DIR)/common/rtmp_mcu.o\
		$(RT28xx_DIR)/common/frq_cal.o\
		$(RT28xx_DIR)/common/rt_rf.o\
		$(RT28xx_DIR)/os/linux/rt_usb.o\
		$(RT28xx_DIR)/chips/rt30xx.o\
		$(RT28xx_DIR)/chips/rt5592.o

ifeq ($(OSABL),NO)
RT28XX_APSTA_OBJ += \
        $(RT28xx_DIR)/common/rtusb_dev_id.o\
        $(RT28xx_DIR)/os/linux/rt_usb_util.o\
        $(RT28xx_DIR)/os/linux/usb_main_dev.o
endif
ifeq ($(HAS_DFS_SUPPORT),y)
RT28XX_APSTA_OBJ += \
	$(RT28xx_DIR)/common/dfs_mcu.o
endif
endif
#endif // RT5572 //

#ifdef RTMP_MAC_PCI
#ifdef RT5592
ifneq ($(findstring 5592,$(CHIPSET)),)
RT28XX_STA_OBJ += \
		$(RT28xx_DIR)/common/cmm_mac_pci.o\
		$(RT28xx_DIR)/common/cmm_data_pci.o\
		$(RT28xx_DIR)/common/rt_rbus_pci_drv.o\
		$(RT28xx_DIR)/common/ee_prom.o\
		$(RT28xx_DIR)/common/frq_cal.o\
		$(RT28xx_DIR)/common/ee_efuse.o\
		$(RT28xx_DIR)/common/rtmp_mcu.o\
		$(RT28xx_DIR)/common/rt_rf.o\
		$(RT28xx_DIR)/chips/rt30xx.o\
		$(RT28xx_DIR)/chips/rt5592.o

ifeq ($(OSABL),NO)
RT28XX_STA_OBJ += \
        $(RT28xx_DIR)/os/rt_pci_rbus.o\
        $(RT28xx_DIR)/os/linux/rt_rbus_pci_util.o\
        $(RT28xx_DIR)/os/linux/pci_main_dev.o
endif
ifeq ($(HAS_DFS_SUPPORT),y)
RT28XX_APSTA_OBJ += \
	$(RT28xx_DIR)/common/dfs_mcu.o
endif
endif
#endif // RT5592 //
#endif // RTMP_MAC_PCI //

#ifdef WSC_INCLUDED
ifeq ($(HAS_WSC),y)
RT28XX_APSTA_OBJ += \
	$(RT28xx_DIR)/common/wsc.o\
	$(RT28xx_DIR)/common/wsc_tlv.o\
	$(RT28xx_DIR)/common/crypt_biginteger.o\
	$(RT28xx_DIR)/common/crypt_dh.o
endif
#endif // WSC_INCLUDED //

#ifdef NINTENDO_AP
ifeq ($(HAS_NINTENDO),y)
RT28XX_APSTA_OBJ += $(RT28xx_DIR)/ap/ap_nintendo.o
endif
#endif // NINTENDO_AP //

ifeq ($(HAS_WDS),y)
RT28XX_APSTA_OBJ += $(RT28xx_DIR)/ap/ap_wds.o

ifeq ($(OSABL),NO)
RT28XX_APSTA_OBJ += \
	../../ap/ap_wds_inf.o
endif
endif

ifeq ($(HAS_QOS_DLS_SUPPORT),y)
RT28XX_APSTA_OBJ += $(RT28xx_DIR)/ap/ap_dls.o
endif

ifeq ($(HAS_IDS_SUPPORT),y)
RT28XX_APSTA_OBJ += $(RT28xx_DIR)/ap/ap_ids.o
endif

#ifdef APCLI_SUPPORT
ifeq ($(HAS_APCLI),y)
RT28XX_APSTA_OBJ += \
	$(RT28xx_DIR)/ap/ap_apcli.o \
	$(RT28xx_DIR)/ap/apcli_ctrl.o \
	$(RT28xx_DIR)/ap/apcli_sync.o \
	$(RT28xx_DIR)/ap/apcli_auth.o \
	$(RT28xx_DIR)/ap/apcli_assoc.o \
	$(RT28xx_DIR)/common/cmm_mat.o \
	$(RT28xx_DIR)/common/cmm_mat_iparp.o \
	$(RT28xx_DIR)/common/cmm_mat_pppoe.o \
	$(RT28xx_DIR)/common/cmm_mat_ipv6.o

ifeq ($(OSABL),NO)
RT28XX_APSTA_OBJ += \
	../../ap/ap_apcli_inf.o
endif
endif
#endif // APCLI_SUPPORT //

#ifdef ETH_CONVERT
ifeq ($(HAS_ETH_CONVERT_SUPPORT), y)
RT28XX_APSTA_OBJ += \
	$(RT28xx_DIR)/common/cmm_mat.o \
	$(RT28xx_DIR)/common/cmm_mat_iparp.o \
	$(RT28xx_DIR)/common/cmm_mat_pppoe.o \
	$(RT28xx_DIR)/common/cmm_mat_ipv6.o
endif
#endif // ETH_CONVERT //

ifeq ($(HAS_BLOCK_NET_IF),y)
RT28XX_APSTA_OBJ += $(RT28xx_DIR)/common/netif_block.o
endif

ifeq ($(HAS_IGMP_SNOOP_SUPPORT),y)
RT28XX_APSTA_OBJ += $(RT28xx_DIR)/common/igmp_snoop.o
endif

#ifdef MESH_SUPPORT
ifeq ($(HAS_MESH_SUPPORT),y)
RT28XX_APSTA_OBJ += \
	$(RT28xx_DIR)/common/mesh_bmpkt.o \
	$(RT28xx_DIR)/common/mesh_ctrl.o \
	$(RT28xx_DIR)/common/mesh_link_mng.o \
	$(RT28xx_DIR)/common/mesh_sanity.o \
	$(RT28xx_DIR)/common/mesh_tlv.o \
	$(RT28xx_DIR)/common/mesh.o \
	$(RT28xx_DIR)/common/mesh_forwarding.o \
	$(RT28xx_DIR)/common/mesh_path_mng.o

ifeq ($(OSABL),NO)
RT28XX_APSTA_OBJ += \
	../../common/mesh_inf.o
endif
endif
#endif // MESH_SUPPORT //

#ifdef WAPI_SUPPORT
ifeq ($(HAS_WAPI_SUPPORT),y)
RT28XX_APSTA_OBJ += \
	$(RT28xx_DIR)/common/wapi.o
endif
#endif // WAPI_SUPPORT //

#ifdef DOT11R_FT_SUPPORT
ifeq ($(HAS_DOT11R_FT_SUPPORT),y)
RT28XX_APSTA_OBJ += \
	$(RT28xx_DIR)/common/ft.o\
	$(RT28xx_DIR)/common/ft_tlv.o\
	$(RT28xx_DIR)/common/ft_iocl.o\
	$(RT28xx_DIR)/common/ft_rc.o\
	$(RT28xx_DIR)/ap/ap_ftkd.o\
	$(RT28xx_DIR)/sta/ft_auth.o\
	$(RT28xx_DIR)/sta/ft_action.o
endif
#endif // DOT11R_FT_SUPPORT //

ifeq ($(HAS_CLIENT_WDS_SUPPORT),y)
RT28XX_APSTA_OBJ += \
	$(RT28xx_DIR)/common/client_wds.o
endif
#endif // CONFIG_APSTA_SUPPORT //

PHONY := all release clean install uninstall

all:$(OBJ)

rt$(MODULE)sta.o: $(RT28XX_STA_OBJ)
	$(LD) -r $^ -o $@

rt$(MODULE)ap.o: $(RT28XX_AP_OBJ)
	$(LD) -r $^ -o $@

rt$(MODULE)apsta.o: $(RT28XX_APSTA_OBJ)
	$(LD) -r $^ -o $@

release:
	echo "MAKE Linux Station Code Release"

clean:
	rm -f $(RT28xx_DIR)/common/*.o
	rm -f $(RT28xx_DIR)/common/.*.{cmd,flags,d}
	rm -f $(RT28xx_DIR)/os/linux/*.{o,ko,mod.{o,c}}
	rm -f $(RT28xx_DIR)/os/linux/.*.{cmd,flags,d}
	rm -fr $(RT28xx_DIR)/os/linux/.tmp_versions
	rm -f $(RT28xx_DIR)/chips/*.o
	rm -f $(RT28xx_DIR)/chips/.*.{cmd,flags,d}
ifeq ($(RT28xx_MODE),AP)
	rm -f $(RT28xx_DIR)/ap/*.o
	rm -f $(RT28xx_DIR)/ap/.*.{cmd,flags,d}
else
ifeq ($(RT28xx_MODE),STA)
	rm -f $(RT28xx_DIR)/sta/*.o
	rm -f $(RT28xx_DIR)/sta/.*.{cmd,flags,d}
else
ifeq ($(RT28xx_MODE),APSTA)
	rm -f $(RT28xx_DIR)/ap/*.o
	rm -f $(RT28xx_DIR)/ap/.*.{cmd,flags,d}
	rm -f $(RT28xx_DIR)/sta/*.o
	rm -f $(RT28xx_DIR)/sta/.*.{cmd,flags,d}
endif
endif
endif

install:
	rm -rf $(DAT_PATH)
	$(shell [ ! -f /etc/Wireless ] && mkdir /etc/Wireless)
	mkdir $(DAT_PATH)
	cp $(RT28xx_DIR)/$(DAT_FILE_NAME) $(DAT_PATH)/.
	install -d $(LINUX_SRC_MODULE)
	install -m 644 -c $(addsuffix .o,$(MOD_NAME)) $(LINUX_SRC_MODULE)
	/sbin/depmod -a ${shell uname -r}

uninstall:
#	rm -rf $(DAT_PATH)
	rm -rf $(addprefix $(LINUX_SRC_MODULE),$(addsuffix .o,$(MOD_NAME)))
	/sbin/depmod -a ${shell uname -r}

# Declare the contents of the .PHONY variable as phony.  We keep that
# information in a variable so we can use it in if_changed and friends.
.PHONY: $(PHONY)

